home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 5
/
Aminet 5 - March 1995.iso
/
Aminet
/
game
/
misc
/
TownMaze.lha
/
TownMaze
/
townmaze.test
< prev
next >
Wrap
Text File
|
1991-08-05
|
7KB
|
186 lines
#/bin/csh
#
# townmaze.test
#
# Here is a thorough test of the townmaze interface error returns
#
echo ""
echo "Executing 'townmaze junk'"
echo "Expected error: unpaired argument error"
townmaze junk
echo ""
echo "Executing 'townmaze junk trash'"
echo "Expected error: non-flag parameter"
townmaze junk trash
echo ""
echo "Executing 'townmaze -h junk'"
echo "Expected error: unreadable -h value"
townmaze -h junk
echo ""
echo "Executing 'townmaze -h -1'"
echo "Expected error: -h value too small"
townmaze -h -1
echo ""
echo "Executing 'townmaze -h 3'"
echo "Expected error: -h value too small"
townmaze -h 3
echo ""
echo "Executing 'townmaze -h 12'"
echo "Expected error: -h value not odd"
townmaze -h 12
echo ""
echo "Executing 'townmaze -h 11'"
echo "Expected error: none -- should make an 11 x 77 maze"
townmaze -h 11
echo ""
echo "Executing 'townmaze -h 11 junk trash'"
echo "Expected error: non-flag parameter"
townmaze -h 11 junk trash
echo ""
echo "Executing 'townmaze -h 11 -w junk'"
echo "Expected error: unreadable -w value"
townmaze -h 11 -w junk
echo ""
echo "Executing 'townmaze -h 11 -w -1'"
echo "Expected error: -w value too small"
townmaze -h 11 -w -1
echo ""
echo "Executing 'townmaze -h 11 -w 3'"
echo "Expected error: -w value too small"
townmaze -h 11 -w 3
echo ""
echo "Executing 'townmaze -h 11 -w 12'"
echo "Expected error: -w value not odd"
townmaze -h 11 -w 12
echo ""
echo "Executing 'townmaze -h 11 -w 11 junk trash'"
echo "Expected error: non-flag-parameter"
townmaze -h 11 -w 11 junk trash
echo ""
echo "Executing 'townmaze -h 11 -w 11'"
echo "Expected error: none -- should make an 11 x 11 maze"
townmaze -h 11 -w 11
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g junk'"
echo "Expected error: unreadable -g value"
townmaze -h 11 -w 11 -g junk
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g -1'"
echo "Expected error: negative -g value"
townmaze -h 11 -w 11 -g -1
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 5'"
echo "Expected error: gates won't fit"
townmaze -h 11 -w 11 -g 5
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 4'"
echo "Expected error: none -- should make an 11 by 11 maze with 4 gates,"
echo " 2 of them left open"
townmaze -h 11 -w 11 -g 4
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 4 junk trash'"
echo "Expected error: non-flag parameter"
townmaze -h 11 -w 11 -g 4 junk trash
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 4 -l junk'"
echo "Expected error: unreadable -l value"
townmaze -h 11 -w 11 -g 4 -l junk
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 4 -l -1'"
echo "Expected error: negative -l value"
townmaze -h 11 -w 11 -g 4 -l -1
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 4 -l 5'"
echo "Expected error: more gates left than started"
townmaze -h 11 -w 11 -g 4 -l 5
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 4 -l 4'"
echo "Expected error: none -- should draw a maze with 4 open gates"
townmaze -h 11 -w 11 -g 4 -l 4
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 4 -l 4 junk trash'"
echo "Expected error: non-flag parameter"
townmaze -h 11 -w 11 -g 4 -l 4 junk trash
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 4 -l 4 -c junk'"
echo "Expected error: unreadable -c parameter"
townmaze -h 11 -w 11 -g 4 -l 4 -c junk
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 4 -l 4 -c -1'"
echo "Expected error: negative -c parameter"
townmaze -h 11 -w 11 -g 4 -l 4 -c -1
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 4 -l 4 -c 2'"
echo "Expected error: courts won't fit"
townmaze -h 11 -w 11 -g 4 -l 4 -c 2
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 4 -l 4 -c 1'"
echo "Expected error: none -- should draw an 11 by 11 maze with 4 open gates"
echo "but no courtyard (so a busier center) because the gates get in the way"
townmaze -h 11 -w 11 -g 4 -l 4 -c 1
echo "Executing 'townmaze -h 11 -w 11 -g 0 -l 0 -c 1'"
echo "Expected error: none -- should draw an 11 by 11 maze with no gates but"
echo "one courtyard opening the center (which usually means no center room)"
townmaze -h 11 -w 11 -g 0 -l 0 -c 1
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 4 -l 4 -c 1 junk trash'"
echo "Expected error: non-flag parameter"
townmaze -h 11 -w 11 -g 4 -l 4 -c 1 junk trash
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 4 -l 4 -c 1 -u junk'"
echo "Expected error: unreadable -u parameter"
townmaze -h 11 -w 11 -g 4 -l 4 -c 1 -u junk
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 4 -l 4 -c 1 -u -1'"
echo "Expected error: negative -u parameter"
townmaze -h 11 -w 11 -g 4 -l 4 -c 1 -u -1
echo ""
echo "Executing 'townmaze -h 11 -w 11 -g 4 -l 4 -c 1 -u 1'"
echo "Expected error: unused cells won't fit"
townmaze -h 11 -w 11 -g 4 -l 4 -c 1 -u 1
echo ""
echo "Executing 'townmaze -h 19 -w 19 -g 4 -l 4 -c 1 -u 1'"
echo "Expected error: none -- should draw a 19 by 19 maze with no unused"
echo "center cell because the gates interfere. The courtyard may appear,"
echo "but may be hard to spot"
townmaze -h 19 -w 19 -g 4 -l 4 -c 1 -u 1
echo ""
echo "Executing 'townmaze -h 19 -w 19 -g 0 -l 0 -c 1 -u 1'"
echo "Expected error: none -- should draw a 19 by 19 maze with no gates,"
echo "an unused center cell, but the courtyard should not appear"
townmaze -h 19 -w 19 -g 0 -l 0 -c 1 -u 1
echo ""
echo "Executing 'townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 junk trash'"
echo "Expected error: non-flag parameter"
townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 junk trash
echo ""
echo "Executing 'townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 -s junk'"
echo "Expected error: unreadable -s parameter"
townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 -s junk
echo ""
echo "Executing 'townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 -s -1'"
echo "Expected error: negative -s parameter"
townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 -s -1
echo ""
echo "Executing 'townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 -s 999'"
echo "Expected error: -s parameter over 998"
townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 -s 999
echo ""
echo "Executing 'townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 -s 998'"
echo "Expected error: none should draw a very straight 21 by 21 maze with"
echo "four open gates, an unused center cell, but no courtyard"
townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 -s 998
echo ""
echo "Executing 'townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 -s 998 junk trash'"
echo "Expected error: non-flag parameter"
townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 -s 998 junk trash
echo ""
echo "Executing 'townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 -s 998 -r junk'"
echo "Expected error: unreadable -r parameter"
townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 -s 998 -r junk
echo ""
echo "Executing 'townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 -s 998 -r 12345'"
echo "Expected error: none -- should draw a maze with a forced random"
echo "number seed"
townmaze -h 21 -w 21 -g 4 -l 4 -c 1 -u 1 -s 998 -r 12345